<?
//<meta http-equiv="content-type" content="text/html; charset=utf-8">
include "head.php";
?>
<script language="javascript">
function process(url) {
	if(confirm('are you sure?')) {
		window.open(url, "processing", "status=no,toolbar=no,scrollbars=no,width=640,height=480");		
	} 
}
</script>
<p><a href="index.php">HOME</a> / <a href="setup.php">Setup</a> / <strong>UMLS Toolbox Install</strong></p>
<p><u>Preliminary requirement </u></p>
<ol>
  <li>hardware requirement 
    <ol>
      <li> main memory size &gt;= 4G</li></ol></li>
  <li>software requirement
    <ol>
      <li>apache (&gt;2.0)</li>
      <li>mysql (&gt;5.0) </li>
      <li>php (&gt;5.0)</li>
    </ol>
  </li>
  <li>Install <a href="http://www.nlm.nih.gov/research/umls/">unified medical language system</a>
      <ol>
        <li>At configuration, check &quot;Output Options &gt; Write MySQL load script&quot;</li>
        <li>If you need, create database. </li>
        <li>run load script to your database.</li>
      </ol>
  </li>
</ol>
<p><u>Make config.php</u></p>
<ol>
<li>$db_hostname = <?=$db_hostname?></li>
<li>$db_username = <?=$db_username?></li>
<li>$db_password = <?=$db_password?></li>
<li>$db_name = <?=$db_name?></li>
<li>$table_prefix = <?=$table_prefix?></li>
</ol>
<p><u>Create database tables</u></p>
<p>If you edit $table_prefix parameter, reload this page.</p>
<form name="form1" method="post" action="install_process.php">
<input type="hidden" name="cmd" value="init_db">
<?
$scripts = str_replace('{$table_prefix}', $table_prefix, file_get_contents("table.txt"));
?>
<p><textarea name="init_query" cols="100" rows="10" readonly><?=$scripts?></textarea></p>
<p><input type="submit" name="Submit" value="Run"></p>
</form>
<p><u>Make data for UMLS toolbox</u></p>
<form name="form1" method="post" action="install_process.php">
<input type="hidden" name="cmd" value="init_program">
<p>시스템에 따라서 10분에서 40분정도 걸림</p>
<ol>
<li>Concept tree
  <ol>
    <li>truncate <?=$table_prefix?>concept_tree</li>
    <li>alter table <?=$table_prefix?>concept_tree disable keys</li>
    <li>insert into <?=$table_prefix?>concept_tree</li>
    <li>alter table <?=$table_prefix?>concept_tree enable keys</li>
  </ol>
</li>
<li>Concept
  <ol>
    <li>truncate <?=$table_prefix?>concept</li>
    <li>alter table <?=$table_prefix?>concept disable keys</li>
    <li>insert into <?=$table_prefix?>concept</li>
    <li>alter table <?=$table_prefix?>concept enable keys</li>
  </ol>
</li>
<li>Concept nstr
  <ol>
    <li>truncate <?=$table_prefix?>concept_nstr</li>
    <li>alter table <?=$table_prefix?>concept_nstr disable keys</li>
    <li>insert into <?=$table_prefix?>concept_nstr</li>
    <li>alter table <?=$table_prefix?>concept_nstr enable keys</li>
  </ol>
</li>
</ol>
<p><input type="submit" name="Submit" value="Run"></p>
</form>
<p>&nbsp;</p>
<?
include "tail.php"
?>